package com.ruoyi.system.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum LikeRecordEnum {

    ARTICLE(1, "文章"),
    COMMENT(2, "评论"),
    RESOURCE(3, "资源");

    private Integer key;
    private String value;

    public static String getByKey(Integer type) {
        for (LikeRecordEnum item : LikeRecordEnum.values()) {
            if (type.equals(item.getKey())) {
                return item.value;
            }
        }
        return null;
    }
}
